import {getRequest, postRequest, putRequest,deleteRequest} from "@/utils/request_utils";

export default {


  /**
   * 页面初始化数据
   */
  initView: () =>
    getRequest(`~/packingDetailsList/init`),
  /**
   * 分页列表查询
   */
  getPackingDetailsList: (params) =>
    getRequest(`~/packingDetailsList/getPackingDetailsList`, {params}),
  /**
   * 单一数据查询
   */
  getPackingDetailsInfo: (params) =>
    getRequest(`~/packingDetailsList/getPackingDetailsInfo`, {params}),
  /**
   * 添加数据
   */
  addPackingDetailsInfo:(data)=>
    postRequest(`~/packingDetailsList/addPackingDetailsInfo`, {data}),
  /**
   * 修改数据
   */
  updatePackingDetailsInfo:(data)=>
    putRequest(`~/packingDetailsList/updatePackingDetailsInfo`, {data}),
  /**
   * 删除
   */
  deletePackingDetails:(data)=>
    putRequest(`~/packingDetailsList/deletePackingDetails` ,{data}),
  /**
   * 导出  分票分箱明细报表导出
   */
  exportSubboxData:(data) =>
    postRequest(`~/packingDetailsList/exportSubboxData`,{data,responseType:'blob'}),

  /**
   * 导出  箱单发票报表导出
   */
  exportBoxInvoice:(data) =>
    postRequest(`~/packingDetailsList/exportBoxInvoice`,{data,responseType:'blob'}),

  /**

   * 导出  附件订单计划报表导出
   */
  exportAttadchmentData:(data) =>
      postRequest(`~/packingDetailsList/exportAttadchmentData`,{data,responseType:'blob'}),

  /**
   * 导出  保险发票样本报表
   */
  exportInsuranceReport:(data) =>
    postRequest(`~/packingDetailsList/exportInsuranceReport`,{data,responseType:'blob'}),

  /**
   * 提单样本（铁路）
   */
  billOfLadingSampleReport:(data) =>
    postRequest(`~/packingDetailsList/billOfLadingSampleReport`,{data,responseType:'blob'}),
  /**
   * 导出  提单样本报表
   */
  exportBookingListData:(data) =>
      postRequest(`~/packingDetailsList/exportBookingListData`,{data,responseType:'blob'}),
  /**
   * 根据物料号从物料表和发货表中获取数据
   */
  getPackingDetailsInfoBymaterialCode: (params) =>
    getRequest(`~/packingDetailsList/getPackingDetailsInfoBymaterialCode`, {params}),
  /**
   * 批量修改
   */
  updatePackingDetailsList:(data)=>
    putRequest(`~/packingDetailsList/updatePackingDetailsList`, {data}),






}
